#  RAMP Media Organizer  
#  Docks.py
#
#  Copyright (C) 2010  Vishesh Yadav  
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from PyQt4 import QtGui, QtCore


class GroupListDock(QtGui.QDockWidget):
    def __init__(self, parent=None):
        QtGui.QDockWidget.__init__(self, "Group Lists", parent)
    
        self.groupList = QtGui.QListWidget()
        self.setObjectName("groupListDock")

        self.setAllowedAreas(QtCore.Qt.RightDockWidgetArea | \
            QtCore.Qt.LeftDockWidgetArea)
        self.setFeatures(QtGui.QDockWidget.DockWidgetMovable \
                | QtGui.QDockWidget.DockWidgetVerticalTitleBar)

        self.setStyleSheet("""
            *{
                 margin-left: 10px;
                 margin-bottom: 8px; 
             }
             ::title
             {
                margin-left: 4px;
             """)

        self.makeListTable()
        self.setWidget(self.groupList)

    def makeListTable(self):
        self.groupList.addItem("Library")
        self.groupList.addItem("Duplicate")
        self.groupList.addItem("Auto Tag")
        self.groupList.addItem("Manual")
        self.groupList.setStyleSheet("""
            * { 
                font-size: 16px;
                font-weight: bold;
              }
            *::item {
                padding: 10px 0px 10px 10px;
                height: 25px;
            }
          """)
        self.groupList.setCurrentRow(0)

